package cn.itcast.com.IO.zijieliu.InPut;

import java.io.*;

public class demo {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\代码\\代码\\代码\\cn\\itcast\\com\\Files\\a\\asd.txt");

        FileInputStream fileInputStream = new FileInputStream("D:\\代码\\代码\\代码\\cn\\itcast\\com\\Files\\a\\asd.txt");
        FileInputStream fileInputStream1 = new FileInputStream(file);
//        int readByte;
//        while ((readByte=fileInputStream.read())!=-1){
//            readByte = fileInputStream.read();
//            char c = (char) readByte;
//            System.out.print(c);
//        }


//        byte[] buffer = new byte[1024];
//        int len = fileInputStream.read(buffer);
//        String a = new String(buffer,0,len);
//        System.out.println(a);

        byte[] buffer = new byte[1024];
        int len = fileInputStream.read(buffer,0,5);
        String a = new String(buffer);
        System.out.println(a);



    }
}
